"semver 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)",
"tar 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "term 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "term 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
"threadpool 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
[[package]]
name = "term"
-version = "0.2.7"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
enum AdequateTerminal {
NoColor(Box<Write + Send>),
- Colored(Box<Terminal<UghWhyIsThisNecessary> + Send>)
+ Colored(Box<Terminal<Output=Box<Write + Send>> + Send>)
}
pub struct Shell {
verbose: bool
}
-struct UghWhyIsThisNecessary {
- inner: Box<Write + Send>,
-}
-
impl MultiShell {
pub fn new(out: Shell, err: Shell, verbose: bool) -> MultiShell {
MultiShell { out: out, err: err, verbose: verbose }
impl Shell {
pub fn create(out: Box<Write + Send>, config: ShellConfig) -> Shell {
- let out = UghWhyIsThisNecessary { inner: out };
if config.tty && config.color {
let term = TerminfoTerminal::new(out);
term.map(|t| Shell {
Shell { terminal: NoColor(Box::new(io::stderr())), config: config }
})
} else {
- Shell { terminal: NoColor(out.inner), config: config }
+ Shell { terminal: NoColor(out), config: config }
}
}
NoColor(ref mut n) => n.flush()
}
}
-}
-
-impl Write for UghWhyIsThisNecessary {
- fn write(&mut self, bytes: &[u8]) -> io::Result<usize> {
- self.inner.write(bytes)
- }
- fn flush(&mut self) -> io::Result<()> {
- self.inner.flush()
- }
-}
+}
\ No newline at end of file